﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>挑战信息发布平台</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css"
			href="<%=request.getContextPath()%>/css/style.css" />
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery-1.4.3.js"></script>
		<script type="text/javascript">
	$(function() {

	})
</script>
	</head>


	<body>
		<div id="wrap">
			<div id="top_content">
				<%@ include file="headNew.jsp"%>
				<div id="list" align="justify">
				<div id="content">
					<p id="whereami">
					</p>
					<p>
						<input type="button" class="button" value="发布挑战" onclick="location='<%=request.getContextPath() %>/jsp/addEmp.jsp'"/>											
					</p>
					<table class="table">
						<tr class="table_header">
							<td>
								序号
							</td>
							<td>
								ID
							</td>
							<td>
								玩家
							</td>
							<td>
								游戏
							</td>
							<td>
								大区
							</td>
							<td>
								佣金
							</td>
							<td>
								挑战者
							</td>
							<td>
								谁来挑战
							</td>
						</tr>
						<s:iterator value="tab" status="stat">
						 <tr class="row${(id+1)%2+1 }">
							<td>
								<s:property value="#stat.count"/>
							</td>
							<td>
								${id}
							</td>
							<td>
								${chellname}
							</td>
							<td>
								${play}
							</td>
							<td>
								${area}
							</td>
							<td>
								${money}
							</td>
							<td>
								${accname}
							</td>							
							<td>
								<a href="war.action?id=${id }" id="challenge">挑战</a>
							</td>
						</tr>
						</s:iterator>
					</table>
					<table class="table" style="font-size:12px;">
					<tr>
					<td>
		<a href="main.action?pagenum=1">首页</a>
		<!-- test属性指定一个ognl表达式,返回boolean类型 -->
		<s:if test="pagenum > 1">
			<a href="main.action?pagenum=${pagenum - 1}">上一页</a>
		</s:if>
	  <s:else>
	  	<a >上一页</a>
	  </s:else>
	  &nbsp;当前页：<input type="text" id="page" name="page" style="width:20px" value="${pagenum}"/> | 共<span id="s1"> ${maxPage }</span> 页
		<s:if test="pagenum < maxPage">
			<a href="main.action?pagenum=${pagenum + 1}">下一页</a>	
		</s:if>
		<s:else>
			<a>&nbsp;下一页</a>
		</s:else>
		<a href="main.action?pagenum=${maxPage}">末页</a>
		</td>
		<td align="right" >
		<s:if test=" pagenum == 1 ">
		<s:if test=" totalnum < pagesize ">		
			当前显示 1 - ${totalnum } 条
		</s:if>
		<s:else>
			当前显示 1 - ${pagesize } 条
		</s:else>
		</s:if>
		<s:if test="pagenum > 1 && pagenum != maxPage">
			当前显示 ${(pagenum-1)*pagesize+1 } - ${pagenum*pagesize } 条
		</s:if>
		<s:if test="pagenum == maxPage">
			当前显示 ${totalnum - totalnum%pagesize + 1 } - ${totalnum } 条
		</s:if>
		 | 共<span id="s1"> ${totalnum } </span>条</td>
		</tr>
		 </table>
				</div>
			</div>      
				
				</div>
				<%@include file="end.jsp"%>
			</div>
			
		</div>
	</body>
</html>
